package com.itcs.box.domain;

import java.io.Serializable;

/**
 * @Author: wanghui
 * @Date: 2019/5/10 16:28
 * @Description: 通讯盒请求实体类
 */
public class BoxRequest implements Serializable {

	private static final long serialVersionUID = 1L;

	private BoxData data;

	private String messgeType; // 消息类型：1

	private String key; // 加密字符串：DeviceId

	private String host;

	private String port;

	private String channelId;

	public void initChnanel(String host, String port, String channelId) {
		this.host = host;
		this.port = port;
		this.channelId = channelId;
	}

	public String getMessgeType() {
		return messgeType;
	}

	public void setMessgeType(String messgeType) {
		this.messgeType = messgeType;
	}

	public String getKey() {
		return key;
	}

	public void setKey(String key) {
		// 协议中的key字段目前暂时填充要加密的字段参数，以后设计了相应加密算法后再填充加密后的字段参数。
		this.key = key.replace("/", "-");
	}

	public BoxData getData() {
		return data;
	}

	public void setData(BoxData data) {
		this.data = data;
	}

	public String getHost() {
		return host;
	}

	public void setHost(String host) {
		this.host = host;
	}

	public String getPort() {
		return port;
	}

	public void setPort(String port) {
		this.port = port;
	}

	public String getChannelId() {
		return channelId;
	}

	public void setChannelId(String channelId) {
		this.channelId = channelId;
	}

}
